import java.util.Arrays;

public class Test04 {
    public static void main(String[] args) {
        System.out.println(1e4);
    }
    public static void main3(String[] args) {
        //ArithmeticException
//        int num = 10/0;
    }
    public static void merge(int A[], int m, int B[], int n) {
        int i = m-1;
        int j = n-1;
        int s = m+n-1;
        while(i >= 0 && j >= 0){
            if(A[i] >= B[j]){
                A[s--] = A[i--];
            }else{
                A[s--] = B[j--];
            }
        }
        while(i >= 0){
            A[s--] = A[i--];
        }
        while(j >= 0){
            A[s--] = B[j--];
        }
    }

    public static void main1(String[] args) {
        int[] A = new int[1_0000];
        A[0] = 4;
        A[1] = 5;
        A[2] = 6;
        int[] B = new int[]{1,2,3};
        merge(A,3,B,3);
        System.out.println(Arrays.toString(A));

    }



}
